# -*- coding: utf-8 -*-
from db.mysql import MysqlClient
from common.helper import Helper
class Arrangement( object ):
    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "“安守人生”个人重大疾病保险"

    def pullData(self, data={}):
        for item in Helper.selectData( self.name,self.mysql ):
            data["name"] = self.name
            data["company"] = "建信财产保险"
            data["year"] = item["year"]
            data["gender"] = "0" if item["gender"] == "F" else "1"
            data["expire"] = item["expire"]
            data["payType"] = item["payType"]
            data["majorDisease"] = str(int(int(item["majorDisease"])/10000)) + "w"
            data["price"] = item["price"]
            Helper.mergeTable( self.name,self.mysql,data )
